<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>我的</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/yzl.css"/>

</head>
<body>
<div  id="blank" v-cloak class="header" style="background:linear-gradient(to right, #8DCDEF,#259CF8)">
    <img v-open-win.tapmode vurl="changeMember" class="user-header-icon" style="float:left"
         v-src="'../../image/user_icon_changeuser.png'">
    <span class="title" style="margin-left:46px;color: white">我的</span>
    <img v-open-win.tapmode vurl="message" class="user-header-icon" style="float:right"
         v-src="'../../image/user_icon_msg.png'">
   <img v-open-win.tapmode vurl="settings" class="user-header-icon" style="float:right"
         v-src="'../../image/user_icon_setting.png'">
    <span v-cloak v-if="unReadMessageCount != '0'" style="position:absolute;z-index:11;font-size:12px;right:25px;top:20px;color:white;background:red;line-height:normal;padding:0 5px;border-radius:7px;">{{unReadMessageCount}}</span>
</div>
</body>
<script src="../../script/api.js"></script>
<script src="../../script/vue.js"></script>
<script src="../../script/app.js"></script>
<script src="../../script/common.js"></script>
<script src="../../script/url.js"></script>
<script>

    var blank;
    apiready = function () {
        setBSImg();
        var params = api.pageParam;
        if(params){
            if(params.startImg){
                openWin('../home/browser', {url: params.startImg.url});
            }
        }
        blank = new Vue({
            el:'#blank',
            data:{
                unReadMessageCount:0
            }
        });

        api.openFrame({
            name: 'user2_frame',
            url: 'user2_frame.html',
            rect: {
                x: 0,
                y: 60,
                w: api.winWidth,
                h: 'auto'
            },
            bounces: true
        });

        doubleBack();
        addListeners();
    };

    function addListeners() {
        api.addEventListener({
            name: 'getUnReadMsgCount'
        }, function (ret) {
            blank.unReadMessageCount = ret.value.count;
            api.setAppIconBadge({
                badge: ret.value.count
            });
        });

        api.addEventListener({
            name: 'viewappear'
        }, function () {
            onPageStart();
        });

        api.addEventListener({
            name: 'viewdisappear'
        }, function () {
            onPageEnd();
        });
    }

</script>
</html>
